<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>

    function testval() {
        let a = 10;
        if (true) {
            let a = 20;
            console.log(a);
        }
        console.log(a);
    }


    testval();
</script>


</body>
</html>